<template>
  <template v-for = "item in fieldList.fieldList">
    <div class = "item" v-if = "item.tableShow">
      <label>{{ item.label }} :</label>
      <div class = "content">{{ dataFormat(item.fieldName, ruleForm[item.fieldName]) }}</div>
    </div>
  </template>
  <el-table
      v-loading = "loading"
      :data = "ruleForm['batchDataList']"
      fit = "true"
      border
      :row-class-name = "rowClassName"
      @selection-change = "handleDetailSelectionChange"
      ref = "tb"
  >
    <template v-for = "item in fieldList.batchFieldList">
      <el-table-column
          :prop = "item.fieldName"
          :label = "item.label"
          :min-width = "item.minWidth + 'px'"
          v-if = "item.formShow"/>

    </template>

  </el-table>
</template>

<script>
export default {
  name: "StarHorseDataView",
  props: {
    ruleForm: {type: Object, required: true},
    fieldList: {type: Object, required: true},
    dataFormat: {type: Function, default: null}
  }

}
</script>

<style scoped>

</style>